import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
// import Tool from '../view/tool/tool.vue'
import Canvas from '../view/tool/canvas'
import Tool from './tool'
import component from './componentRouter'
import vueRouter from './vueRouter'
import jsRouter from './jsRouter'
import htmlRouter from './htmlRouter'
import cssRouter from './cssRouter'



Vue.use(Router)
const router=new Router({
  routes: [
    jsRouter,
    Tool,
    component,
    vueRouter,
    htmlRouter,
    cssRouter
  ]
})
router.beforeEach((to, from, next) => {
  console.log(to.path);
  if (to.path === '/') {
    next("/jsLib/js");
  }else{
    next()
  }
  
});
export default router

